﻿// <copyright file="IdBaseOutOfRangeError.cs" company="Hallvard Korsgaard">
//  Microsoft Public License (Ms-PL). See license details here: http://enoceannet.codeplex.com/license
// </copyright>
// <author>Hallvard Korsgaard</author> 

namespace EnOcean.Message.Error
{
  using System;

  /// <summary>
  /// This message is generated when the user tries to change the ID range base using the SetIdBase command to a value outside the allowed range from 0xFF800000 to 0xFFFFFFFF.
  /// </summary>
  [Serializable]
  public class IdBaseOutOfRangeError : Error
  {
    /// <summary>
    /// Creates the byte format of the message.
    /// </summary>
    /// <param name="message">A byte array of length 14 to hold the message contents.</param>
    protected internal override void CreateMessage(byte[] message)
    {
      base.CreateMessage(message);
      message[3] = (byte)MessageType.IdOutOfRangeError;
    }
  }
}
